#define _CRT_SECURE_NO_WARNINGS 1
#include<string>
#include<cctype>
#include<iostream>
using namespace std;

class Solution 
{
public:
    string clearDigits(string s)
    {
        string ret;
        for (char c : s)
        {
            if (isdigit(c))
                ret.pop_back();
            else
                ret.push_back(c);
        }
        return ret;
    }
};